package com.zzty.txj1.service.impl;

import com.zzty.txj1.dao.SelfExamTransactionDao;
import com.zzty.txj1.entity.SelfExamTransaction;
import com.zzty.txj1.entity.User;
import com.zzty.txj1.service.SelfExamTransactionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SelfExamTransactionServiceImpl implements SelfExamTransactionService {
    @Autowired
    SelfExamTransactionDao selfExamTransactionDao;
    @Override
    public SelfExamTransaction checkFirstLogIn(SelfExamTransaction selfExamTransaction) {
        SelfExamTransaction selfExamTransaction1=selfExamTransactionDao.checkFirstLogIn(selfExamTransaction);
        return selfExamTransaction1;
    }

    @Override
    public Integer initSelfExamTransaction(SelfExamTransaction selfExamTransaction) {
        Integer flag=selfExamTransactionDao.initSelfExamTransaction(selfExamTransaction);
        return flag;
    }

    @Override
    public String getStartTime(SelfExamTransaction selfExamTransaction) {
        String startTime=selfExamTransactionDao.getStartTime(selfExamTransaction);
        return startTime;
    }

    @Override
    public Integer updateUrlSpendTime(SelfExamTransaction selfExamTransaction) {
        Integer flag=selfExamTransactionDao.updateUrlSpendTime(selfExamTransaction);
        return flag;
    }

    @Override
    public List<SelfExamTransaction> getSelfExamTransaction(User user) {
        List<SelfExamTransaction> selfExamTransactions=selfExamTransactionDao.getSelfExamTransaction(user);
        return selfExamTransactions;
    }
}
